﻿using NetBrick.Client;
using UniBrickCommon.Packets;
using UnityEngine;

namespace Handler
{
    public class UpdatePlayerListHandler : PacketHandler
    {
        public UpdatePlayerListHandler(Client client)
            : base(client)
        {
        }

        public override void Process(object packetData)
        {
            var updatePlayerListPacket = (UpdatePlayerListPacket) packetData;
            UniBrickClient.Instance.UpdatePlayers(updatePlayerListPacket.PlayerList);
        }
    }
}